var Stype = require("./Stype.js");
var game_config = null;
var HOST_IP = "127.0.0.1";//服务器内网ip

game_config = {
	 //GATEWAY_CONNECT_IP: "139.159.249.140", //华为云网关ip地址，提供给clie链接
	GATEWAY_CONNECT_IP: "127.0.0.1",


	gateway_config: {
		host: HOST_IP,
		ports: [6080, 6081],
	},

	webserver: {
		host: HOST_IP,
		port: 10001,
	},

	game_system_server: {
		host: HOST_IP,
		port: 6087,
		stypes: [Stype.GameSystem],
	},

	game_server: {
		host: HOST_IP,
		port: 6088,
		stypes: [Stype.Game5Chess],
	},

	game_database: {
		host: HOST_IP,
		port: 3306,
		db_name: "h5_game",

		uname: "root",
		upwd: "root",
	},

	center_server: {
		host: HOST_IP,
		port: 6086,
		stypes: [Stype.Auth],
	},

	center_database: {
		host: HOST_IP,
		port: 3306,
		db_name: "h5_center",

		uname: "root",
		upwd: "root",
	},

	center_redis: {
		host: HOST_IP,
		port: 6379,
		db_index: 0,
	},

	game_redis: {
		host: HOST_IP,
		port: 6379,
		db_index: 1,
	},

	// 代码来生成
	gw_connect_servers: {
		/*0: {
			stype: Stype.TalkRoom,
			host: "127.0.0.1",
			port: 6084, 
		},*/

		1: {
			stype: Stype.Auth,
			host: HOST_IP,
			port: 6086,
		},

		2: {
			stype: Stype.GameSystem,
			host: HOST_IP,
			port: 6087,
		},

		3: {
			stype: Stype.Game5Chess,
			host: HOST_IP,
			port: 6088,
		},
	},

	// 游戏注册时候的一些数据;
	game_data: {
		first_uexp: 1000,
		first_uchip: 1000,

		login_bonues_config: {
			clear_login_straight: false, // 是否清除连续登录	
			bonues: [100, 200, 300, 400, 500], // 后面都是最多奖励500，
		},

		// 离线生成: 
		// (1)写入数据库, (2) 离线生成json文件 (3)代码加载配置文件来得到配置
		five_chess_zones: {
			0: {zid: 1, name: "新手场", vip_level: 0, min_chip: 100, one_round_chip: 3, think_time: 15},
			1: {zid: 2, name: "高手场", vip_level: 0, min_chip: 5000, one_round_chip: 10, think_time: 10},
			2: {zid: 3, name: "大师场", vip_level: 0, min_chip: 10000, one_round_chip: 16, think_time: 10},			 
		}
	},
};

module.exports = game_config;